package com.kady.Dao;

import com.kady.entity.*;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

/**
 * \* Created with IntelliJ IDEA.
 * \* User: kady
 * \* Date: 2021/3/27
 * \* Time: 10:47
 * \* 千峰JAVA2101班
 * \* Description: 订单Dao
 * \
 */
public interface OrderDao {
    List<Map<String,Object>> selectOrderList() throws SQLException;

    Order selectById(String orderId) throws SQLException;

    long updateStatus(Object...objs) throws SQLException;

    List<Map<String, Object>> selectDetailList(String orderId) throws SQLException;

    Map countPrice (String orderId) throws SQLException;

    long countDetailsById(String foodId) throws SQLException;

    long addOrder(String orderId,User user, String tableId, Cart cart) throws SQLException;

    void addOrderDeatilItem(String orderId,String foodId, CartItem cartItem) throws SQLException;

    Order selectOrderByUserId(int user_id) throws SQLException;
}
